<!-- 这个html模板是给application/home/controller/Coupon.php控制器里面的 详情界面方法info() 来渲染的 -->

<link rel="stylesheet" href="/assets/home/css/coupon_info.css" />
<script src="/assets/home/js/swiper-bundle.min.js"></script>


<div class="coupon_cover">
    <img src="{$coupon.thumb_text}" />
</div>

<div class="coupon_detail">
    <div class="coupon_info">
        <div class="left">
            <div class="left_top">
                <div>
                    <span>{$coupon.rate*100}</span>折
                </div>
                <div class="top_info">
                    <div>{$coupon.title}</div>
                    <div>COUPON</div>
                </div>
            </div>
        </div>
        <div class="receive">
            {if condition="$coupon.receive"}
            <!-- 传到application/home/Coupon.php里面的receive()方法，['cid' => $coupon['id']]表示把$coupon的id传给receive()方法的cid -->
            <a href="{:url('home/coupon/receive', ['cid' => $coupon['id']])}" class="mui-btn mui-btn-success">立即领取</a>
            {else /}
            <a class="mui-btn" disabled>已领取</a>
            {/if}
        </div>
    </div>
    <div class="coupon_prompt">
        <div class="prompt_title">温馨提示：</div>
        <div><span>•</span>活动开始时间：{$coupon.createtime_text}</div>
        <div><span>•</span>活动结束时间：{$coupon.endtime_text}</div>
        <div><span>•</span>领取数量：{$coupon.total} 张，每人限领1张。赶快领取吧！</div>
    </div>
</div>

<h1>显示谁领取</h1>